package com.lgc.demo.example.calculatenumberofpeople;

import java.text.ParseException;
import java.text.SimpleDateFormat;

/**
 * 计算当前应该显示的人数
 */
public class Program {
    public static void main(String[] args) throws ParseException {
        NumberOfPeople numberOfPeople = new NumberOfPeople();

        int number = numberOfPeople.getNumber(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse("2018-04-30 21:00:00"));
        System.out.println("number=" + String.valueOf(number));

        int number2 = numberOfPeople.getNumber(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse("2018-04-30 20:58:00"));
        System.out.println("number2=" + String.valueOf(number2));

        int number3 = numberOfPeople.getNumber(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse("2018-04-30 23:59:59"));
        System.out.println("number3=" + String.valueOf(number3));

        int a = 0;
    }
}
